﻿<UserControl x:Class="SoftSource.Timecard.Views.UtilizationSummaryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:SoftSource.Timecard.Views"
             xmlns:localControls="clr-namespace:SoftSource.Timecard.Controls"
             xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
             xmlns:softsourceControls="clr-namespace:SoftSource.Controls;assembly=SoftSource.Controls.Silverlight"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             xmlns:System="clr-namespace:System;assembly=mscorlib"
             xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
             d:DesignWidth="773"
             d:DesignHeight="680">

    <UserControl.Resources>
        <local:UtilizationSummaryWeekConverter x:Key="UtilizationSummaryWeekConverter" />
        <DataTemplate x:Key="EntryGroupDataTemplate">
            <Grid>
                <localControls:EntryGroupControl DataContext="{Binding Converter={StaticResource UtilizationSummaryWeekConverter}}" />
            </Grid>
        </DataTemplate>
    </UserControl.Resources>

    <controlsToolkit:BusyIndicator x:Name="Busy"
                                   HorizontalContentAlignment="Stretch"
                                   VerticalContentAlignment="Stretch">
        <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>

            <StackPanel HorizontalAlignment="Left">
                <softsourceControls:DateRangeSelector x:Name="UtilizationDateRangeSelector"
                                                      Margin="4" />
                <Button Content="Refresh"
                        Margin="4"
                        Click="Refresh_Click" />
            </StackPanel>

            <data:DataGrid x:Name="UserDataGrid"
                           Grid.Row="1"
                           IsReadOnly="True"
                           VirtualizingStackPanel.VirtualizationMode="Recycling"
                           AutoGenerateColumns="False" />
        </Grid>
    </controlsToolkit:BusyIndicator>
</UserControl>
